package scale.GUI;

import java.awt.Color;
import java.awt.ComponentOrientation;
import java.awt.Font;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;


import javax.swing.*;
import javax.swing.border.Border;

public class TextField extends JPanel{
	
	JTextArea T = new JTextArea();
	JTextArea T1 = new JTextArea();
	JTextArea T2 = new JTextArea();
	
	public TextField(){

		this.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
		this.setLayout(new GridBagLayout());
		GridBagConstraints c = new GridBagConstraints();		

		c.anchor = GridBagConstraints.FIRST_LINE_START;
		T.setBackground(Color.black);
		T.setForeground(Color.green);
		T.setEditable(false);
		T.setFont(new Font("",Font.PLAIN, 20));
		T.setMaximumSize(T.getPreferredSize());
		T.setMinimumSize(T.getPreferredSize());
		c.gridwidth = 2;
		c.anchor = GridBagConstraints.FIRST_LINE_START;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.ipady = 25;
		c.ipadx = 400;
		c.ipadx = 0;
		c.ipadx = 0;
		this.add(T,c);
		
		T1.setBackground(Color.black);
		T1.setForeground(Color.green);
		T1.setEditable(false);
		T1.setFont(new Font("",Font.PLAIN, 20));
		T1.setMaximumSize(T1.getPreferredSize());
		T1.setMinimumSize(T1.getPreferredSize());
		c.gridwidth = 1;
		c.anchor = GridBagConstraints.FIRST_LINE_START;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.ipady = 25;
		c.ipadx = 200;
		c.gridx = 0;
		c.gridy = 1;
		this.add(T1,c);
		
		T2.setBackground(Color.black);
		T2.setForeground(Color.green);
		T2.setEditable(false);
		T2.setFont(new Font("",Font.PLAIN, 20));
		T2.setMaximumSize(T1.getPreferredSize());
		T2.setMinimumSize(T1.getPreferredSize());
		c.gridwidth = 1;
		c.anchor = GridBagConstraints.FIRST_LINE_START;
		c.fill = GridBagConstraints.HORIZONTAL;
		c.ipady = 25;
		c.ipadx = 200;
		c.gridx = 1;
		c.gridy = 1;
		this.add(T2,c);
	
	}
	
	public void updateText(String s){
		T.setText(s);
	}
	
	public void updateText1(String s){
		T1.setText(s);
	}
	
	public String getText1(){
		return T1.getText();
	}
	
//	public String snupText(){
//		String s = "";
//		s = T.getText();
//		return s;
//	}
//	
	
}
